package com.whmall.service.crm.module.supplierreview.impl.dao;

import com.whmall.service.crm.module.supplierreview.SupplierReviewQueryCriteria;
import com.whmall.service.crm.module.supplierreview.entity.SupplierReviewDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * SupplierReviewMapper
 *
 * @author alex
 * @since 2021/1/18
 */
@Mapper
public interface SupplierReviewMapper {
    int insertSelective(SupplierReviewDO record);

    int optimisticUpdateByIdSelective(SupplierReviewDO record);

    SupplierReviewDO selectById(Long id);

    /**
     * 乐观锁更新为已统计，避免其他操作同时更新数据导致数据不一致
     */
    int optimisticUpdateAsCounted(SupplierReviewDO review);

    List<SupplierReviewDO> findByQuertCriteria(SupplierReviewQueryCriteria criteria);
}
